package com.von.eduservice.client;

import com.von.commonutils.R;
import com.von.eduservice.client.impl.VodFileDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Vonzhe
 * @create 2020/5/18 14:08
 **/
@Component
@FeignClient(name="service-vod",fallback = VodFileDegradeFeignClient.class)
public interface VodClient {

    /**
     * 定义方法路径
     * 根据视频id删除阿里云视频
     * @PathVariable 一定要标参数名称
     */
    @DeleteMapping("/eduvideo/video/removeAlyVideo/{id}")
    public R removeAlyVideo(@PathVariable("id") String id);

    @DeleteMapping("/eduvideo/video/delete-batch")
    public R removeVideoList(@RequestParam("videoIdList") List<String> videoIdList);
}
